﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MulagoDb.database;

namespace MulagoDb
{
    public partial class DiagnosisPanel : UserControl
    {
        public DiagnosisPanel()
        {
            InitializeComponent();
        }

        private void monthRadio_CheckedChanged(object sender, EventArgs e)
        {
            yearsCombo.Enabled = false;
            monthCombo.Enabled = true;
        }

        private void yearsRadio_CheckedChanged(object sender, EventArgs e)
        {
            monthCombo.Enabled = false;
            yearsCombo.Enabled = true;
        }

        private void submitBtn_Click(object sender, EventArgs e)
        {
                MulagoDb.database.ScdDiagnosis.insertDiagnosis(FindPatient.patientId, scdClassificationCombo.Text,
                monthCombo.Text, firstSymptomCombo.Text, reasonCombo.Text, historyCombo.Text,
                screeningCombo.Text, labMethodCombo.Text);
            //
                MulagoDb.database.ScdDiagnosis.insertScdOtherlabtests(FindPatient.patientId, hivTestCombo.Text,
                hivDateCombo.Text, hivResultsCombo.Text);
            //
                MulagoDb.database.ScdDiagnosis.insertScd_g6pd(FindPatient.patientId, gpTestCombo.Text, gpDateCombo.Text, gpResultCombo.Text);
            //
            MessageBox.Show(this, "Diagnosis records Successfully added");
        }

        private void DiagnosisPanel_Load(object sender, EventArgs e)
        {
            patientLbl.Text = patientLbl.Text + " " + FindPatient.patienceName;
        }

        private void diagnosisGrpBox_Enter(object sender, EventArgs e)
        {

        }

        private void patientLbl_Click(object sender, EventArgs e)
        {

        }
    }
}
